package com.wc.AlgoOJ.MA0008_因数个数3;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/3/30 18:16
 * @description http://43.138.190.70:8888/p/MA0008
 */
public class Main {
    static int M = 3000020;
    static int[] primes = new int[M / 10];
    static boolean[] st = new boolean[M];
    static int idx = 0;

    static void ola() {
        st[0] = st[1] = true;
        for (int i = 2; i < M; i++) {
            if (!st[i]) primes[++idx] = i;
            for (int j = 1; primes[j] * i < M; j++) {
                st[primes[j] * i] = true;
                if (i % primes[j] == 0) break;
            }
        }
    }

    public static void main(String[] args) {
        ola();
        Scanner sc = new Scanner(System.in);
        int l = sc.nextInt();
        int r = sc.nextInt();
        long res = 0;
        for (int i = 1; i <= r; i++) {
            res += r / i - (l - 1) / i;
        }
        System.out.println(res);
    }
}
